#ifndef __Orz_CoinPool_h__
#define __Orz_CoinPool_h__	

namespace Orz
{
	namespace Temp
	{
	class CoinPool;
	typedef boost::shared_ptr<CoinPool> CoinPoolPtr;
	class CoinPool
	{
	public:
		static const int AllOther;
	public:
		CoinPool(int quantitative);
		bool link(CoinPoolPtr pool,const int & part);

		void push(void);
		size_t total(void);
		bool out(size_t n);
	private:

		void reset(void);
		const int _quantitative;
		int _remaining;
		int _allOther;
		std::vector<boost::tuple<CoinPoolPtr, int, int> > _list;
		size_t _total;
	};

	}
}

#endif

